package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysInsuranceweekDetailsMapper;
import com.ruoyi.system.domain.SysInsuranceweekDetails;
import com.ruoyi.system.service.ISysInsuranceweekDetailsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 投保周明细下载Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-17
 */
@Service
public class SysInsuranceweekDetailsServiceImpl implements ISysInsuranceweekDetailsService 
{
    @Autowired
    private SysInsuranceweekDetailsMapper sysInsuranceweekDetailsMapper;

    /**
     * 查询投保周明细下载
     * 
     * @param id 投保周明细下载ID
     * @return 投保周明细下载
     */
    @Override
    public SysInsuranceweekDetails selectSysInsuranceweekDetailsById(Long id)
    {
        return sysInsuranceweekDetailsMapper.selectSysInsuranceweekDetailsById(id);
    }

    /**
     * 查询投保周明细下载列表
     * 
     * @param sysInsuranceweekDetails 投保周明细下载
     * @return 投保周明细下载
     */
    @Override
    public List<SysInsuranceweekDetails> selectSysInsuranceweekDetailsList(SysInsuranceweekDetails sysInsuranceweekDetails)
    {
        return sysInsuranceweekDetailsMapper.selectSysInsuranceweekDetailsList(sysInsuranceweekDetails);
    }

    /**
     * 新增投保周明细下载
     * 
     * @param sysInsuranceweekDetails 投保周明细下载
     * @return 结果
     */
    @Override
    public int insertSysInsuranceweekDetails(SysInsuranceweekDetails sysInsuranceweekDetails)
    {
        sysInsuranceweekDetails.setCreateTime(DateUtils.getNowDate());
        return sysInsuranceweekDetailsMapper.insertSysInsuranceweekDetails(sysInsuranceweekDetails);
    }

    /**
     * 修改投保周明细下载
     * 
     * @param sysInsuranceweekDetails 投保周明细下载
     * @return 结果
     */
    @Override
    public int updateSysInsuranceweekDetails(SysInsuranceweekDetails sysInsuranceweekDetails)
    {
        sysInsuranceweekDetails.setUpdateTime(DateUtils.getNowDate());
        return sysInsuranceweekDetailsMapper.updateSysInsuranceweekDetails(sysInsuranceweekDetails);
    }

    /**
     * 删除投保周明细下载对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysInsuranceweekDetailsByIds(String ids)
    {
        return sysInsuranceweekDetailsMapper.deleteSysInsuranceweekDetailsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除投保周明细下载信息
     * 
     * @param id 投保周明细下载ID
     * @return 结果
     */
    public int deleteSysInsuranceweekDetailsById(Long id)
    {
        return sysInsuranceweekDetailsMapper.deleteSysInsuranceweekDetailsById(id);
    }
}
